package com.common;

import java.util.List;
import java.util.Map;

import edu.mit.mobile.android.imagecache.SimpleThumbnailAdapter;
import android.content.Context;
import android.view.View;
import android.view.ViewGroup;

public class ImageAdapter extends  SimpleThumbnailAdapter {
	int count=0;
  public ImageAdapter(Context context, List<? extends Map<String, ?>> data,
			int layout, String[] from, int[] to, int[] imageIDs) {
	
		super(context, data, layout, from, to, imageIDs);
		count=data.size();
		 
	}

 

  @Override
  public int getCount() {
    return Integer.MAX_VALUE;
  }
 
  @Override
  public View getView(int position, View convertView, ViewGroup parent) {
	  
	  if(count>0)
	  {
	    position= position % count;
	  }
      return  super.getView(position, convertView, parent); 
   
   
  }

 
}
